package com.zhongkai.listener;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.ChannelAwareMessageListener;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


@Component
public class TestListener implements ChannelAwareMessageListener {

    @Autowired
    public RabbitTemplate template;


    @Override
    public void onMessage(Message message, Channel channel) throws Exception {
        System.out.println(111111111);
        System.out.println(message);
    }
}

